package cn.ilikes.tools.hbase.jpa.persistences;

import java.util.Map;

import javax.persistence.Cache;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.PersistenceUnitUtil;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.metamodel.Metamodel;

import cn.ilikes.tools.hbase.jpa.JPAHBaseNoSupportException;
import cn.ilikes.tools.hbase.jpa.JPAHbasePersistenUnitEnv;

public abstract class JPAHBaseEntityManagerFactory extends JPAHBaseEntityManagerFactoryEnv implements EntityManagerFactory {

	public JPAHBaseEntityManagerFactory(JPAHbasePersistenUnitEnv hbasePersistenUnitEnv) {
		super(hbasePersistenUnitEnv);

	}

	public void init() {

	}

	@Override
	public void close() {
		throw new JPAHBaseNoSupportException("this not work ");

	}

	@Override
	public EntityManager createEntityManager() {
		throw new JPAHBaseNoSupportException("this not work ");
	}

	@Override
	public EntityManager createEntityManager(Map arg0) {
		throw new JPAHBaseNoSupportException("this not work ");
	}

	/**
	 * Interface used to interact with the second-level cache. If a cache
	 * is not in use, the methods of this interface have no effect, except
	 * for contains, which returns false.
	 */
	@Override
	public Cache getCache() {
		throw new JPAHBaseNoSupportException("this not work ");
	}

	@Override
	public CriteriaBuilder getCriteriaBuilder() {
		throw new JPAHBaseNoSupportException("this not work ");
	}

	@Override
	public Metamodel getMetamodel() {
		throw new JPAHBaseNoSupportException("this not work ");
	}

	/**
	 * The methods of this interface should only be invoked on entity
	 * instances obtained from or managed by entity managers for this
	 * persistence unit or on new entity instances.
	 */
	@Override
	public PersistenceUnitUtil getPersistenceUnitUtil() {
		throw new JPAHBaseNoSupportException("this not work ");
	}

	@Override
	public Map<String, Object> getProperties() {
		throw new JPAHBaseNoSupportException("this not work ");
	}

	@Override
	public boolean isOpen() {
		throw new JPAHBaseNoSupportException("this not work ");
	}

}
